Page({
  data:{
    icon:'success',
    title:'购买成功',
    remark:'小铅笔已经收到你的订单，2天内安排发货'
  },
  ok:function(event){
      var payData = wx.getStorageSync('payData');
      var goodsCode = payData.goodsCode;
      wx.clearStorageSync("payData");
      wx.redirectTo({
        url: '../goods/goods?goodsCode='+goodsCode
      })
  },
  onLoad:function(options){
    var that = this;
    var icon='';
    var title='';
    var remark='';
    if(options.status==0){
        icon='success';
        title='购买成功';
        remark='小铅笔已经收到你的订单，2天内安排发货';
    }else if(options.status==1){
        icon='warn';
        title='购买失败';
        remark='呜呜...支付失败了';
    }
    that.setData({
        icon:icon,
        title:title,
        remark:remark
    });
  }
})